package com.service.Authorization.service;

import com.service.Authorization.dto.FindAccountAndPasswordDto;
import com.service.Authorization.entity.AuthorizationUser;
import com.service.Authorization.dto.AuthorizationDto;
import com.service.config.utils.Result;

import java.util.List;

/**
 * 授权终端用户认证表(AuthorizationUser)表服务接口
 *
 * @author makejava
 * @since 2020-08-21 13:57:43
 */
public interface AuthorizationUserService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    AuthorizationUser queryById(String id);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
    List<AuthorizationUser> queryAllByLimit(int offset, int limit);

    /**
     * 新增数据
     *
     * @param authorizationUser 实例对象
     * @return 实例对象
     */
    AuthorizationUser insert(AuthorizationUser authorizationUser);

    /**
     * 修改数据
     *
     * @param authorizationUser 实例对象
     * @return 实例对象
     */
    AuthorizationUser update(AuthorizationUser authorizationUser);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(String id);

    /**
     * 授权终端用户
     * @param authorizationVo
     * @throws Exception
     * @return
     */
    Result setAuthorization(AuthorizationDto authorizationVo) throws Exception;

    Result getUserNameAndPassword(FindAccountAndPasswordDto findAccountAndPasswordDto) throws Exception;

    Result authorizationUserNoPassword(AuthorizationDto authorizationVo) throws Exception;
    /**
     * 强制下线
     * @param userinfo
     * @param authorizationUser
     * @throws Exception
     */
    //void downAuthorization(Userinfo userinfo, AuthorizationUser authorizationUser) throws Exception;
}
